package com.jr.service;

import com.jr.entity.Address;

import java.util.List;

public interface AddressService {
    /**
     * 新增地址
     * @param address
     * @return int类型 大于1新增成功
     * @throws Exception
     */
    int addAddress(Address address)throws Exception;

    /**
     * 根据企业id查询所有的地址
     * @param enterpriseId
     * @return list集合
     * @throws Exception
     */
    List<Address> listAllAddress(Integer enterpriseId)throws Exception;

    /**
     * 根据id更新状态,是否存在  用作假删除地址
     * @param addressId
     * @return
     * @throws Exception
     */
    int updateAddressExist(Integer addressId)throws Exception;

    /**
     * 根据id更新地址
     * @param address
     * @return
     * @throws Exception
     */
    int updateAddressById(Address address)throws Exception;

    /**
     * 根据id设置地址默认值
     * @return
     * @throws Exception
     */
    int setAddressDefaultById(Integer addressId)throws Exception;

    /**
     * 将所有默认改为普通
     * @return
     * @throws Exception
     */
    int setAllAddressDefault()throws Exception;


}
